.fullscreen-preview .glitch {
  &.glitch-banner {
    z-index: 0;
  }
}

.glitch {
  &.hidden {
    display: none !important;
  }

  .hidden {
    display: none !important;
  }

  .btn {
    text-decoration: none;
    color: black !important;
    background: #7effcc;
    border: 3px solid black;
    border-radius: 5px;
    box-shadow: 3px 3px 0 0 black;
    cursor: pointer;
  }

  .btn:hover {
    background: #46ffb5;
  }

  .glitch-logo {
    background-image: ~"url(/img/glitch.svg)";
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }

  .export-button {
    display: inline-block;
    font-family: Helvetica;
    font-weight: bold;
    text-decoration: none;
    margin-left: 14px;
    font-size: 12px;
    line-height: 14px;
    padding: 11px 10px 9px;

    .export-icon {
      display: inline-block;
      vertical-align: -3px;
      width: 14px;
      height: 14px;
      margin-right: 8px;
      background-image: ~"url(/img/export.svg)";
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
    }

    &.export-link-button {
      background: #fff;
    }

    .export-glitch-icon {
      .export-icon;

      background-image: ~"url(/img/glitch.svg)";
    }
  }

  &.glitch-banner {
    position: absolute;
    width: 100%;
    height: 61px;
    box-shadow: 0 5px 0 0 #c1bfbf;
    background: white;
    z-index: 50;

    .glitch-banner-content {
      font-family: 'Open Sans';
      font-weight: bold;
      font-size: 14px;
      line-height: 19px;
      color: black;
      margin: 13px auto;

      .glitch-logo {
        display: inline-block;
        vertical-align: -15px;
        width: 42px;
        height: 42px;
        margin-right: 14px;
      }

      .more-info {
        color: black !important;
        font-size: 12px;
        font-family: 'Open Sans';
        font-weight: normal;
      }
    }
  }

  &.glitch-cta.underlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100;

    .glitch-cta.content {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      background: white;
      padding: 75px;
      text-align: center;
      box-shadow: 10px 10px 0 0 #c1bfbf;
      width: 500px;
      box-sizing: border-box;

      .cta-close {
        position: absolute;
        top: 32px;
        right: 32px;
        width: 14px;
        height: 14px;
        border: none;
        background: inherit;
        cursor: pointer;
      }

      .glitch-logo {
        display: block;
        width: 70px;
        height: 54px;
        margin: 0 auto 15px;
      }

      h1 {
        font-family: Arvo;
        font-size: 30px;
        font-weight: 900;
        line-height: 1.2;
        margin: 0;
      }

      p {
        font-size: 14px;
        font-family: 'Open Sans';
        font-weight: 600;
        line-height: 1.4;
        margin: 30px auto;
        padding: 0;
      }

      .error p {
        font-size: 18px;
        line-height: 24px;
        font-weight: 400;
      }

      & > p:last-child { /* read more link */
        margin-bottom: 0;
        font-size: 12px;
        font-weight: 400;
      }

      .export-button {
        display: inline-block;
        font-size: 18px;
        line-height: 1.2;
        padding: 15px 17px;

        .export-icon,
        .export-glitch-icon {
          vertical-align: -3px;
          width: 20px;
          height: 20px;
          margin-right: 15px;
        }
      }
    }
  }

  .export-related-cta {
    .glitch-cta.content {
      width: 480px;
      padding: 55px 75px;

      h1 {
        font-size: 24px;
        font-weight: 900;
        line-height: 30px;
        margin: 0;
        text-align: left;
      }

      ul {
        text-align: left;
        font-size: 14px;
        line-height: 20px;
        padding-left: 17px;

        li {
          margin-bottom: 1em;
        }
      }

      .export-button {
        user-select: none;
        width: 100%;
        margin-left: 0;
        text-align: left;
        padding-left: 21px;

        &.unpublished {
          margin-top: 1em;
        }

        &.busy {
          background: white;
          color: #999 !important;
          border-color: #999;
          box-shadow: 3px 3px 0 0 #999;

          .export-icon,
          .export-glitch-icon {
            opacity: 0.5;
          }
        }
      }
    }
  }

  &.editor {
    &.glitch-cta.underlay {
      .export-related-cta;
    }
  }

  /* rule overrides for the projects page */
  &.project-list {
    margin-bottom: 5px;

    .glitch-cta.underlay {
      .export-related-cta;
    }

    .project-ui .export-button {
      font-family: 'Open Sans';
      font-weight: 700;
      font-size: 16px;
      line-height: 1.4;
      box-shadow: none;
      border: 2px solid black;
      border-radius: 3px;
      padding: 5px 18px;
      margin-right: 5px;

      .export-icon,
      .export-glitch-icon {
        width: 18px;
        height: 18px;
      }
    }

    .hooray {
      display: inline-block;
      font-family: 'Open Sans';
      font-weight: 700;
      font-style: italic;
      color: black;
      opacity: 0.4;
    }
  }
}

.glitch + .feature-section + .page-content {
  background: #eee;
  margin: -50px 0;
  padding: 50px 0 80px;

  ol > li {
    line-height: 150%;
    color: rgba(0, 0, 0, 0.65);
  }

  a.faq-link {
    text-decoration: none;
    color: inherit;

    &:hover,
    &:focus,
    &:active,
    &:visited {
      color: inherit;
      text-decoration: none;
    }

    &:hover::before {
      content: '#';
      width: 0;
      display: inline-block;
      position: relative;
      left: -1em;
    }
  }
}
